<?php
$advLimit = 5;
$daoAdv = new Application_Model_DAO_Adv();
$advs = $daoAdv->getRandomAdvsByPlace(Application_Model_DAO_Adv::PLACE_LEFT, $advLimit);
if (empty($advs)) {
    $advs = array();
}
$cnt = count($advs);
?>
<div class="thumbnails adv-column">
    <?php foreach ($advs as $adv): ?>
        <div class="thumbnail adv_thumbnail">
            <?= $this->advContent($adv, 222, 300) ?>
        </div>
    <?php endforeach ?>
    <?php if ($cnt < $advLimit): ?>
        <div class="thumbnail adv_static">
            <img src="/graph/column-left/blank.jpg" alt="" />
        </div>
    <?php endif ?>
</div>